<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>easynode.framework.server.http.KOAHttpServer - EasyNode API参考文档</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="EasyNode API参考文档" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: EasyNode - 0.1.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/EasyNode.html">EasyNode</a></li>
                                <li><a href="../classes/easynode.framework.aop.AOP.html">easynode.framework.aop.AOP</a></li>
                                <li><a href="../classes/easynode.framework.BeanFactory.html">easynode.framework.BeanFactory</a></li>
                                <li><a href="../classes/easynode.framework.cache.CacheStat.html">easynode.framework.cache.CacheStat</a></li>
                                <li><a href="../classes/easynode.framework.cache.ICache.html">easynode.framework.cache.ICache</a></li>
                                <li><a href="../classes/easynode.framework.cache.Memcached.html">easynode.framework.cache.Memcached</a></li>
                                <li><a href="../classes/easynode.framework.cache.Redis.html">easynode.framework.cache.Redis</a></li>
                                <li><a href="../classes/easynode.framework.db.IConnection.html">easynode.framework.db.IConnection</a></li>
                                <li><a href="../classes/easynode.framework.db.IDataSource.html">easynode.framework.db.IDataSource</a></li>
                                <li><a href="../classes/easynode.framework.db.MysqlConnection.html">easynode.framework.db.MysqlConnection</a></li>
                                <li><a href="../classes/easynode.framework.db.MysqlDataSource.html">easynode.framework.db.MysqlDataSource</a></li>
                                <li><a href="../classes/easynode.framework.Logger.html">easynode.framework.Logger</a></li>
                                <li><a href="../classes/easynode.framework.mq.IQueue.html">easynode.framework.mq.IQueue</a></li>
                                <li><a href="../classes/easynode.framework.mq.RedisListQueue.html">easynode.framework.mq.RedisListQueue</a></li>
                                <li><a href="../classes/easynode.framework.mq.RedisQueue.html">easynode.framework.mq.RedisQueue</a></li>
                                <li><a href="../classes/easynode.framework.mvc.Action.html">easynode.framework.mvc.Action</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionArgConverter.html">easynode.framework.mvc.ActionArgConverter</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionContext.html">easynode.framework.mvc.ActionContext</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionExecutor.html">easynode.framework.mvc.ActionExecutor</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionFactory.html">easynode.framework.mvc.ActionFactory</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionRequestParameter.html">easynode.framework.mvc.ActionRequestParameter</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ActionResult.html">easynode.framework.mvc.ActionResult</a></li>
                                <li><a href="../classes/easynode.framework.mvc.CombinedAction.html">easynode.framework.mvc.CombinedAction</a></li>
                                <li><a href="../classes/easynode.framework.mvc.EJSTemplateViewRenderer.html">easynode.framework.mvc.EJSTemplateViewRenderer</a></li>
                                <li><a href="../classes/easynode.framework.mvc.IActionContextListener.html">easynode.framework.mvc.IActionContextListener</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ITemplateViewRenderer.html">easynode.framework.mvc.ITemplateViewRenderer</a></li>
                                <li><a href="../classes/easynode.framework.mvc.JadeTemplateViewRenderer.html">easynode.framework.mvc.JadeTemplateViewRenderer</a></li>
                                <li><a href="../classes/easynode.framework.mvc.JSONView.html">easynode.framework.mvc.JSONView</a></li>
                                <li><a href="../classes/easynode.framework.mvc.MethodDispatchedAction.html">easynode.framework.mvc.MethodDispatchedAction</a></li>
                                <li><a href="../classes/easynode.framework.mvc.Model.html">easynode.framework.mvc.Model</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ModelField.html">easynode.framework.mvc.ModelField</a></li>
                                <li><a href="../classes/easynode.framework.mvc.ModelProxyActionFactory.html">easynode.framework.mvc.ModelProxyActionFactory</a></li>
                                <li><a href="../classes/easynode.framework.mvc.MustacheTemplateViewRenderer.html">easynode.framework.mvc.MustacheTemplateViewRenderer</a></li>
                                <li><a href="../classes/easynode.framework.mvc.spi.MysqlModelGenerator.html">easynode.framework.mvc.spi.MysqlModelGenerator</a></li>
                                <li><a href="../classes/easynode.framework.mvc.View.html">easynode.framework.mvc.View</a></li>
                                <li><a href="../classes/easynode.framework.plugin.EasyNodePlugin.html">easynode.framework.plugin.EasyNodePlugin</a></li>
                                <li><a href="../classes/easynode.framework.plugin.PluginLoadContext.html">easynode.framework.plugin.PluginLoadContext</a></li>
                                <li><a href="../classes/easynode.framework.queue.MQTTQueue.html">easynode.framework.queue.MQTTQueue</a></li>
                                <li><a href="../classes/easynode.framework.server.AbstractServer.html">easynode.framework.server.AbstractServer</a></li>
                                <li><a href="../classes/easynode.framework.server.http.KOAActionContext.html">easynode.framework.server.http.KOAActionContext</a></li>
                                <li><a href="../classes/easynode.framework.server.http.KOADefaultRoutes.html">easynode.framework.server.http.KOADefaultRoutes</a></li>
                                <li><a href="../classes/easynode.framework.server.http.KOAHttpRequestParameter.html">easynode.framework.server.http.KOAHttpRequestParameter</a></li>
                                <li><a href="../classes/easynode.framework.server.http.KOAHttpServer.html">easynode.framework.server.http.KOAHttpServer</a></li>
                                <li><a href="../classes/easynode.framework.server.http.KOAHttpServer.SessionSupport.html">easynode.framework.server.http.KOAHttpServer.SessionSupport</a></li>
                                <li><a href="../classes/easynode.framework.server.KOAMemorySessionStorage.html">easynode.framework.server.KOAMemorySessionStorage</a></li>
                                <li><a href="../classes/easynode.framework.server.ServerStat.html">easynode.framework.server.ServerStat</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.Decoder.html">easynode.framework.server.tcp.Decoder</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.Encoder.html">easynode.framework.server.tcp.Encoder</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.Message.html">easynode.framework.server.tcp.Message</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.MessageHandler.html">easynode.framework.server.tcp.MessageHandler</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.protocols.JSONDecoder.html">easynode.framework.server.tcp.protocols.JSONDecoder</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.protocols.JSONEncoder.html">easynode.framework.server.tcp.protocols.JSONEncoder</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.protocols.JSONMessageHandler.html">easynode.framework.server.tcp.protocols.JSONMessageHandler</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.StreamDecoderHelper.html">easynode.framework.server.tcp.StreamDecoderHelper</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.StreamEncoderHelper.html">easynode.framework.server.tcp.StreamEncoderHelper</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.TCPClient.html">easynode.framework.server.tcp.TCPClient</a></li>
                                <li><a href="../classes/easynode.framework.server.tcp.TCPServer.html">easynode.framework.server.tcp.TCPServer</a></li>
                                <li><a href="../classes/easynode.framework.test.TestCase.html">easynode.framework.test.TestCase</a></li>
                                <li><a href="../classes/easynode.framework.test.TestCaseRunner.html">easynode.framework.test.TestCaseRunner</a></li>
                                <li><a href="../classes/easynode.framework.util..StringUtil.html">easynode.framework.util..StringUtil</a></li>
                                <li><a href="../classes/easynode.framework.util.Binary.html">easynode.framework.util.Binary</a></li>
                                <li><a href="../classes/easynode.framework.util.HTTPUtil.html">easynode.framework.util.HTTPUtil</a></li>
                                <li><a href="../classes/easynode.framework.util.MustacheHelper.html">easynode.framework.util.MustacheHelper</a></li>
                                <li><a href="../classes/easynode.framework.util.ObjectWrapper.html">easynode.framework.util.ObjectWrapper</a></li>
                                <li><a href="../classes/easynode.framework.util.SqlUtil.html">easynode.framework.util.SqlUtil</a></li>
                                <li><a href="../classes/easynode.framework.util.VersionComparator.html">easynode.framework.util.VersionComparator</a></li>
                                <li><a href="../classes/easynode.framework.view.TemplateView.html">easynode.framework.view.TemplateView</a></li>
                                <li><a href="../classes/easynode.GenericObject.html">easynode.GenericObject</a></li>
                                <li><a href="../classes/全局函数.html">全局函数</a></li>
                            </ul>
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>easynode.framework.server.http.KOAHttpServer Class</h1>
<div class="box meta">

        <div class="extends">
            Extends <a href="../classes/easynode.GenericObject.html" class="crosslink">easynode.GenericObject</a>
        </div>

        <div class="foundat">
            Defined in: <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l53"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:53</code></a>
        </div>


        <p>Available since 0.1.0</p>
</div>


<div class="box intro">
    <p>KOAHttpServer封装了一个koa Application，预定义了access logger，csrf，session, routes等中间件，并支持通过API方式向koa Application
增加新的中间件、路由。<br>
中间件和路由的加载顺序：favicon-&gt;access log-&gt;static files(包括所有静态文件目录)-&gt;session-&gt;csrf-&gt;$middlewares-&gt;default routes-&gt;$extra routes-&gt;$middleware-after-routes</p>
<h5>使用参考：</h5>
<pre>
<pre class="code prettyprint"><code>                    require('../src/EasyNode.js');
                    EasyNode.addSourceDirectory('src');
                    var co = require('co');
                    var assert = require('assert');
                    var logger = using('easynode.framework.Logger').getLogger();

                    var KOAHttpServer = using('easynode.framework.server.http.KOAHttpServer');
                    var server = new KOAHttpServer();

                    // redis session存储
                    //server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_REDIS, {
                   //        host : '127.0.0.1',
                   //        port : 6379
                   //});

                    // memcached session存储
                    //server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_MEMCACHED, {
                   //        host : '127.0.0.1',
                   //        port : 11211
                   //});

                    // memory session 存储
                    server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_MEMORY);

                    //增加一个WEB目录。
                    server.addWebDirs('plugins/demo/www/');

                    //增加一个中间件
                    server.addMiddleware(function * (next) {
                   console.log('this message is printed anytime');
                   console.log(this.parameter.param('a'));
                   console.log(this.parameter.param('b'));
                   console.log(this.parameter.dateParam('c'));
                   console.log(this.remoteAddress);                        //客户端IP地址
                           yield next;
                   });

                    //增加一个在路由之后的中间件
                    server.addMiddlewareAfterRoutes(function * (next) {
                   console.log('this message is printed when no route was found');
                           this.type = 'json';
                           this.body = {
                                   hello : 'EasyNode'
                           };
                           yield next;
                   });

                    //增加一个路由
                    server.addRoute('get', '/abc.jsp', function * () {
                            this.body = 'This is abc.jsp';
                   });

                    //启动服务

                    co(function * (){
                           yield server.start();
                   }).catch(onError());

                    //错误处理
                    function onError(err) {
                           if(err) {
                                   logger.error(err);
                           }
                   }
</code></pre>
 </pre>
</div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods extends">
                            <li class="index-item method private">
                                <a href="#method__addExtraWebDirs">_addExtraWebDirs</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createAccessLogger">_createAccessLogger</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createDefaultMiddlewares">_createDefaultMiddlewares</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createDefaultRoutes">_createDefaultRoutes</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createDefaultRoutes">_createDefaultRoutes</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createExtraMiddlewares">_createExtraMiddlewares</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createMemcachedStorage">_createMemcachedStorage</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createMemoryStorage">_createMemoryStorage</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createMiddlewaresAfterRoutes">_createMiddlewaresAfterRoutes</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createMultipartMiddleware">_createMultipartMiddleware</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__createRedisStorage">_createRedisStorage</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method__getSessionStore">_getSessionStore</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addMiddleware">addMiddleware</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addMiddlewareAfterRoutes">addMiddlewareAfterRoutes</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addRoute">addRoute</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_addWebDirs">addWebDirs</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_broadcast">broadcast</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_connections">connections</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_enableCSRF">enableCSRF</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_enableCSRF">enableCSRF</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_getClassName">getClassName</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getUploadDir">getUploadDir</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getWebRoot">getWebRoot</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_is">is</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_noop">noop</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_off">off</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_send">send</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setActionContextListener">setActionContextListener</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setKeys">setKeys</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setSessionStorage">setSessionStorage</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setUploadDir">setUploadDir</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setWebRoot">setWebRoot</a>

                            </li>
                            <li class="index-item method private">
                                <a href="#method_start">start</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_toJSON">toJSON</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_toJSONString">toJSONString</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_toString">toString</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_trigger">trigger</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_writeAccessLog">writeAccessLog</a>

                            </li>
                            <li class="index-item method inherited">
                                <a href="#method_构造函数">构造函数</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties extends">
                            <li class="index-item property private">
                                <a href="#property__app">_app</a>

                            </li>
                            <li class="index-item property private">
                                <a href="#property__keys">_keys</a>

                            </li>
                            <li class="index-item property private">
                                <a href="#property__sessionStorage">_sessionStorage</a>

                            </li>
                            <li class="index-item property private">
                                <a href="#property__sessionStorageOptions">_sessionStorageOptions</a>

                            </li>
                            <li class="index-item property private">
                                <a href="#property__uploadDir">_uploadDir</a>

                            </li>
                            <li class="index-item property private">
                                <a href="#property__webRoot">_webRoot</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method__addExtraWebDirs" class="method item private">
    <h3 class="name"><code>_addExtraWebDirs</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l672"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:672</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加用户定义的静态文件目录(通过addWebDirs函数)。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createAccessLogger" class="method item private">
    <h3 class="name"><code>_createAccessLogger</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Generator</span>
        </span>


        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l503"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:503</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>写AccessLog的中间件。
如果需要记录会话用户，则需要在后续中间件或者route或action中设置session.user.id至koa context</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Generator</span>:
                    <p>符合koa中间件规范的AccessLog的generator对象。</p>

            </div>
        </div>


</div>
<div id="method__createDefaultMiddlewares" class="method item private">
    <h3 class="name"><code>_createDefaultMiddlewares</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l593"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:593</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>加载默认中间件。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createDefaultRoutes" class="method item private">
    <h3 class="name"><code>_createDefaultRoutes</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l556"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:556</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加用户定义的Routes(通过addRoute函数)。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createDefaultRoutes" class="method item private">
    <h3 class="name"><code>_createDefaultRoutes</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l542"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:542</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>默认Routes。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createExtraMiddlewares" class="method item private">
    <h3 class="name"><code>_createExtraMiddlewares</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l577"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:577</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加用户定义的Middleware(通过addMiddleware函数)。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createMemcachedStorage" class="method item private">
    <h3 class="name"><code>_createMemcachedStorage</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>


        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l489"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:489</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>session memcached存储</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    <p>session memcached存储对象。koa-memcached模块支持。</p>

            </div>
        </div>


</div>
<div id="method__createMemoryStorage" class="method item private">
    <h3 class="name"><code>_createMemoryStorage</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>


        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l461"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:461</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>session内存存储</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    <p>session内存存储对象。实现get、set、destroy接口。</p>

            </div>
        </div>


</div>
<div id="method__createMiddlewaresAfterRoutes" class="method item private">
    <h3 class="name"><code>_createMiddlewaresAfterRoutes</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l657"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:657</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加在Route之后的middleware, 通过addMiddlewareAfterRoutes</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createMultipartMiddleware" class="method item private">
    <h3 class="name"><code>_createMultipartMiddleware</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>app</code>
                </li>
            </ul><span class="paren">)</span>
        </div>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l614"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:614</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加multipart-form-data支持。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">app</code>
                        <span class="type">Koa</span>


                    <div class="param-description">
                        <p>koa实例</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method__createRedisStorage" class="method item private">
    <h3 class="name"><code>_createRedisStorage</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>


        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l475"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:475</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>session redis存储</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    <p>session redis存储对象。koa-redis模块支持。</p>

            </div>
        </div>


</div>
<div id="method__getSessionStore" class="method item private">
    <h3 class="name"><code>_getSessionStore</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>


        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l430"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:430</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>返回session的storage对象，符合koa-generic-session接口定义。get、set、destroy。</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    <p>storage 存储对象。实现get、set、destroy接口。</p>

            </div>
        </div>


</div>
<div id="method_addMiddleware" class="method item">
    <h3 class="name"><code>addMiddleware</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>gen</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l271"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:271</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加中间件，中间件是一个generator函数，请注意：中间件会按先后顺序添加到koa，具体流程请参考start函数。
在任何中间件中可以访问koa ctx对象，即中间件generator函数中的this对象，的parameter对象，该成员是
easynode.framework.server.http.KOAHttpRequestParameter类实例，用于获取HTTP请求参数和上传的文件。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">gen</code>
                        <span class="type">Generator</span>


                    <div class="param-description">
                        <p>generator函数，符合koa中间件规范</p>

                    </div>

                </li>
            </ul>
        </div>



        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>server.addMiddleware(function * (next) {
         console.log('this message is printed anytime');
         console.log(this.parameter.param('a'));
         console.log(this.parameter.param('b'));
         console.log(this.parameter.dateParam('c'));
         yield next;
 });</code></pre>

            </div>
        </div>
</div>
<div id="method_addMiddlewareAfterRoutes" class="method item">
    <h3 class="name"><code>addMiddlewareAfterRoutes</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>gen</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l295"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:295</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加中间件(在Routes之后)，中间件是一个generator函数，请注意：中间件会按先后顺序添加到koa，具体流程请参考start函数。
在任何中间件中可以访问koa ctx对象，即中间件generator函数中的this对象，的parameter对象，该成员是
easynode.framework.server.http.KOAHttpRequestParameter类实例，用于获取HTTP请求参数和上传的文件。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">gen</code>
                        <span class="type">Generator</span>


                    <div class="param-description">
                        <p>generator函数，符合koa中间件规范</p>

                    </div>

                </li>
            </ul>
        </div>



        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code> server.addMiddlewareAfterRoutes(function * (next) {
         console.log('this message is printed when no route was found');
         this.type = 'json';
         this.body = {
                 hello : 'EasyNode'
         };
         yield next;
 });</code></pre>

            </div>
        </div>
</div>
<div id="method_addRoute" class="method item">
    <h3 class="name"><code>addRoute</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>method</code>
                </li>
                <li class="arg">
                        <code>uri,</code>
                </li>
                <li class="arg">
                        <code>gen,</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l319"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:319</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加一个路由。
在任何路由中可以访问koa ctx对象，即中间件generator函数中的this对象，的parameter对象，该成员是
easynode.framework.server.http.KOAHttpRequestParameter类实例，用于获取HTTP请求参数和上传的文件。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">method</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>http method，支持&quot;all&quot;, &quot;get&quot;, &quot;post&quot;, &quot;put&quot;, &quot;delete&quot;</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">uri,</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>以&quot;/&quot;开头</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">gen,</code>
                        <span class="type">Generator</span>


                    <div class="param-description">
                        <p>路由generator函数</p>

                    </div>

                </li>
            </ul>
        </div>



        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>server.addRoute('get', '/abc.jsp', function * () {
         this.body = 'This is abc.jsp';
});
</code></pre>

            </div>
        </div>
</div>
<div id="method_addWebDirs" class="method item">
    <h3 class="name"><code>addWebDirs</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>arr</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l244"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:244</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>增加静态文件查找目录</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">arr</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>静态文件列表，相对于EasyNode的目录。</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_broadcast" class="method item">
    <h3 class="name"><code>broadcast</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>msg</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
        </span>






        <span class="flag async">async</span>

    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l840"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:840</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>向所有客户端广播消息。HTTP服务不支持主动向客户端发送消息，仅抛出错误。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">msg</code>
                        <span class="type">Buffer</span>


                    <div class="param-description">
                        <p>消息体</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>:
                    <p>客户端列表</p>

            </div>
        </div>


</div>
<div id="method_connections" class="method item">
    <h3 class="name"><code>connections</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
        </span>






        <span class="flag async">async</span>

    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l809"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:809</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>获取客户端连接列表。KOAHttpServer只返回一个空的数组。</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>:
                    <p>客户端连接列表，每个客户端连接应至少包含一个token字标用于唯一标识一个客户端连接</p>

            </div>
        </div>


</div>
<div id="method_enableCSRF" class="method item">
    <h3 class="name"><code>enableCSRF</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>flag</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l388"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:388</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置HTTP Server是否启用CSRF防御。默认禁用。启用时需要koa-csrf模块支持。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">flag</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>


                    <div class="param-description">
                        <p>true-启用；false-禁用。</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_enableCSRF" class="method item">
    <h3 class="name"><code>enableCSRF</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>flag</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l401"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:401</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置HTTP Server是否启用404中间件。默认启用。可以通过addMiddlewareAfterRoutes函数自行增加一个404处理中间件，在这个
中间件中不调用yield next中止downstream中间件可以达到同样的效果。KOAHttpServer的404中间件总是位于中间件最底端。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">flag</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>


                    <div class="param-description">
                        <p>true-启用；false-禁用。</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_getClassName" class="method item inherited">
    <h3 class="name"><code>getClassName</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_getClassName">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l82"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:82</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        获取对象的全类名
    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
                    对象的字符串描述
            </div>
        </div>


</div>
<div id="method_getUploadDir" class="method item">
    <h3 class="name"><code>getUploadDir</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l193"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:193</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>获取HTTP服务上传目录。</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
                    <p>返回HTTP服务上传目录</p>

            </div>
        </div>


</div>
<div id="method_getWebRoot" class="method item">
    <h3 class="name"><code>getWebRoot</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l164"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:164</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>获取HTTP服务根目录。</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
                    <p>返回HTTP服务根目录</p>

            </div>
        </div>


</div>
<div id="method_is" class="method item inherited">
    <h3 class="name"><code>is</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>namespace</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_is">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l133"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:133</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        判定对象是否属于某个类型
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">namespace</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        全类名
                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
                    对象是否为某个类的实例
            </div>
        </div>


        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <p>var ExpressServer = using('easynode.framework.server.http.ExpressServer');
new ExpressServer(3010).is('easynode.framework.server.http.ExpressServer');  <a href="//true">//true</a></p>

            </div>
        </div>
</div>
<div id="method_noop" class="method item inherited">
    <h3 class="name"><code>noop</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_noop">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l149"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:149</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        无操作函数。可链式调用。
    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                    this
            </div>
        </div>


        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <p>var ExpressServer = using('easynode.framework.server.http.ExpressServer');
new ExpressServer(3010).is('easynode.framework.server.http.ExpressServer');  <a href="//true">//true</a></p>

            </div>
        </div>
</div>
<div id="method_off" class="method item inherited">
    <h3 class="name"><code>off</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>event</code>
                </li>
                <li class="arg">
                        <code>listener</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_off">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l56"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:56</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        removeListener函数的别名。参考：Node.js events.EventEmitter.removeListener()函数。
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">event</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        事件名称
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">listener</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function" class="crosslink external" target="_blank">Function</a></span>


                    <div class="param-description">
                        事件监听器
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_send" class="method item">
    <h3 class="name"><code>send</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>clientTokens</code>
                </li>
                <li class="arg">
                        <code>msg</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
        </span>






        <span class="flag async">async</span>

    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l823"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:823</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>向客户端发送消息。HTTP服务不支持主动向客户端发送消息，仅抛出错误。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">clientTokens</code>
                        <span class="type">Array/String</span>


                    <div class="param-description">
                        <p>客户端Token列表，客户端Token可以唯一识别一个客户端。传递Array时，
向多个客户端发送消息</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">msg</code>
                        <span class="type">Buffer</span>


                    <div class="param-description">
                        <p>消息体</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>:
                    <p>客户端列表</p>

            </div>
        </div>


</div>
<div id="method_setActionContextListener" class="method item">
    <h3 class="name"><code>setActionContextListener</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>@param</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l415"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:415</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置KOAActionContext的事件处理器。可在此注入数据库支持、缓存支持、队列支持等等。<br/>
这是一个非常重要的函数，用于设置EasyNode中所有Action的调用上下文，包括数据库连接使用，cache使用，MQ使用
等，这些对象的使用，EasyNode已经抽象出相应的接口。<br/>
EasyNode的新版本可能会再抽象其他一些通用的功能接口</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">@param</code>
                        <span class="type"><a href="../classes/easynode.framework.mvc.IActionContextListener.html" class="crosslink">easynode.framework.mvc.IActionContextListener</a></span>


                    <div class="param-description">
                        <p>l ActionContext事件监听器</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setKeys" class="method item">
    <h3 class="name"><code>setKeys</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>keys</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l259"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:259</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置koa的KEY</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">keys</code>
                        <span class="type">...</span>


                    <div class="param-description">
                        <p>Key列表，每个KEY是string。</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setSessionStorage" class="method item">
    <h3 class="name"><code>setSessionStorage</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>storage</code>
                </li>
                <li class="arg">
                        <code>opt</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l348"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:348</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置Session的存储类型，默认Session支持为内存存储，这容易引起内存泄漏，请不要用于生产环境。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">storage</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>存储类型, KOAHttpServer.SessionSupport.STORAGE_*</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">opt</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>


                    <div class="param-description">
                        <p>参数，使用KOAHttpServer.SessionSupport.STORAGE_MEMORY时，忽略此参数。</p>

                    </div>

                </li>
            </ul>
        </div>



        <div class="example">
            <h4>Example:</h4>

            <div class="example-content">
                <pre class="code prettyprint"><code>var KOAHttpServer = using('easynode.framework.server.http.KOAHttpServer');
var server = new KOAHttpServer();

//use memory session
server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_MEMORY);

//use redis session storage
server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_REDIS, {
        host : '127.0.0.1',
        port : 6379,
        db : 'EasyNode_Session',
        pass : 'password_of_db'
});

//use memcached session storage
server.setSessionStorage(KOAHttpServer.SessionSupport.STORAGE_MEMCACHED, {
        host : '127.0.0.1',
        port : 11211
});</code></pre>

            </div>
        </div>
</div>
<div id="method_setUploadDir" class="method item">
    <h3 class="name"><code>setUploadDir</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>uploadDir</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l183"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:183</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置文件上传目录。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">uploadDir</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>HTTP服务根目录，相对路径</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setWebRoot" class="method item">
    <h3 class="name"><code>setWebRoot</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>webRoot</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l153"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:153</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置HTTP服务根目录。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">webRoot</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        <p>HTTP服务根目录，相对路径</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_start" class="method item private">
    <h3 class="name"><code>start</code></h3>

        <span class="paren">()</span>



        <span class="flag private">private</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l688"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:688</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>启动KOAHttpServer并加载中间件，中间件会按先后顺序添加到koa，具体流程如下：<br>
favicon-&gt;access log-&gt;static files(包括所有静态文件目录)-&gt;session-&gt;csrf-&gt;$middlewares-&gt;default routes-&gt;$extra routes-&gt;$middleware-after-routes</p>

    </div>




</div>
<div id="method_toJSON" class="method item inherited">
    <h3 class="name"><code>toJSON</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_toJSON">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l105"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:105</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        返回对象的JSON对象，即：Notation
    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>:
                    <p>对象的Notation</p>

            </div>
        </div>


</div>
<div id="method_toJSONString" class="method item inherited">
    <h3 class="name"><code>toJSONString</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_toJSONString">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l93"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:93</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        返回对象的JSON String表达式
    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
                    对象的JSON字符串描述
            </div>
        </div>


</div>
<div id="method_toString" class="method item inherited">
    <h3 class="name"><code>toString</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
        </span>







    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_toString">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l70"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:70</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        获取对象的字符串描述
    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
                    对象的字符串描述
            </div>
        </div>


</div>
<div id="method_trigger" class="method item inherited">
    <h3 class="name"><code>trigger</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>event</code>
                </li>
                <li class="arg">
                        <code>args</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>Inherited from
                <a href="../classes/easynode.GenericObject.html#method_trigger">easynode.GenericObject</a>:
        <a href="../files/.._src_easynode_GenericObject.js.html#l43"><code>..&#x2F;src&#x2F;easynode&#x2F;GenericObject.js:43</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        emit函数的别名。参考：Node.js events.EventEmitter.emit()函数。
    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">event</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>


                    <div class="param-description">
                        事件名称
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">args</code>
                        <span class="type">...</span>


                    <div class="param-description">
                        事件参数
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_writeAccessLog" class="method item">
    <h3 class="name"><code>writeAccessLog</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>flag</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l205"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:205</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>设置服务是否记录访问日志</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">flag</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>


                    <div class="param-description">
                        <p>是否记录访问日志</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_构造函数" class="method item">
    <h3 class="name"><code>构造函数</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>port</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
            <p>Inherited from
            <a href="../classes/easynode.GenericObject.html#method_构造函数">
                easynode.GenericObject
            </a>
            but overwritten in
        <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l132"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:132</code></a>
        </p>



            <p>Available since 0.1.0</p>
    </div>

    <div class="description">
        <p>构造函数。</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">port</code>
                        <span class="type">Int</span>


                    <div class="param-description">
                        <p>端口，默认5000</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

                    <div id="property__app" class="property item private">
                        <h3 class="name"><code>_app</code></h3>
                        <span class="type">koa.Application</span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l701"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:701</code></a>
                            </p>
                    
                    
                                <p>Available since 0.1.0</p>
                        </div>
                    
                        <div class="description">
                            <p>koa Application实例</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__keys" class="property item private">
                        <h3 class="name"><code>_keys</code></h3>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l235"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:235</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>koa app的key</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__sessionStorage" class="property item private">
                        <h3 class="name"><code>_sessionStorage</code></h3>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l220"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:220</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>Session 存储类型，默认KOAHttpServer.SessionSupport.STORAGE_MEMORY</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__sessionStorageOptions" class="property item private">
                        <h3 class="name"><code>_sessionStorageOptions</code></h3>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object" class="crosslink external" target="_blank">Object</a></span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l227"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:227</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>Session 存储选项，默认null</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__uploadDir" class="property item private">
                        <h3 class="name"><code>_uploadDir</code></h3>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l175"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:175</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>上传文件目录，默认www/uploads</p>
                    
                        </div>
                    
                    
                    
                    </div>
                    <div id="property__webRoot" class="property item private">
                        <h3 class="name"><code>_webRoot</code></h3>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    
                    
                            <span class="flag private">private</span>
                    
                    
                    
                        <div class="meta">
                                    <p>
                                    Defined in
                            <a href="../files/.._src_easynode_framework_server_http_KOAHttpServer.js.html#l144"><code>..&#x2F;src&#x2F;easynode&#x2F;framework&#x2F;server&#x2F;http&#x2F;KOAHttpServer.js:144</code></a>
                            </p>
                    
                    
                        </div>
                    
                        <div class="description">
                            <p>HTTP服务的根目录，默认配置项：easynode.servers.koa-HttpServer.rootDirectory或www</p>
                    
                        </div>
                    
                    
                    
                    </div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
